import pytest

@pytest.fixture(scope='class')
def createzhangSan():
    print('\n ***  创建 ***')
    zhangSan = {
        'username'   : 'zhangsan',
        'password'   : '111111',
    }

    yield zhangSan

    print('\n ***  清除 ***')


class Test_C:

    def test_C001(self):
        print('\n用例C001')

    def test_C002(self, createzhangSan):
        print(createzhangSan)
        print('\n用例C002')

    def test_C003(self):
        print('\n用例C003')


class Test_D:

    def test_D001001(self, createzhangSan):
        print('\n用例D001')


@pytest.fixture(params=["chrome","firefox"])
def browser(request):
    return request.param

def test_login(browser):
    print(f'{browser} visit login')
